package com.ztjy.purchase.biz;

import com.github.pagehelper.PageInfo;
import com.ztjy.bean.CDetails;
import com.ztjy.bean.CPurchase;
import org.apache.ibatis.annotations.Param;

import java.sql.Date;
import java.util.List;

public interface CPurchaseBiz {
    /**
     * 采购单查询所有
     * @param pageNo
     * @param pageSize
     * @param cPurchase
     * @param mintime
     * @param maxtime
     * @param mintotal
     * @param maxtotal
     * @return
     */
    public PageInfo<CPurchase> findCPurchaseByCount(Integer pageNo, Integer pageSize, CPurchase cPurchase,  Date mintime,  Date maxtime,  Double mintotal,  Double maxtotal);
    /**
     * 采购单查询所有
     * @param pageNo
     * @param pageSize
     * @param cPurchase
     * @param mintime
     * @param maxtime
     * @param mintotal
     * @param maxtotal
     * @return
     */
    public PageInfo<CPurchase> findCPurchaseByCountStatus2(Integer pageNo, Integer pageSize, CPurchase cPurchase,  Date mintime,  Date maxtime,  Double mintotal,  Double maxtotal);

    /**
     * 查询所有
     * @return
     */
    List<CPurchase> findAllCPurchase(CPurchase purchase);
    /**
     * 根据采购单编号查询
     * @param purchaseId
     * @return
     */

    /**
     * id查询
     * @param purchaseId
     * @return
     */
    public CPurchase findCPurchaseByPid(String purchaseId);

    List<CPurchase> findListCPurchaseByPid(String purchaseId);

    /**
     * 添加
     * @param cPurchase
     * @return
     */
    public boolean addCPurchase(CPurchase cPurchase, CDetails cDetails);

    /**
     * 修改
     * @param cPurchase
     * @return
     */
    public boolean updateCPurchase(CPurchase cPurchase);

    /**
     * 删除
     * @param purchaseId
     * @return
     */
    public boolean delCPurchase(String purchaseId);

    /**
     * 修改
     * @param purchaseId
     * @param checkId
     * @return
     */
    public boolean updateStatus(String purchaseId,Integer checkId);

    /**
     * 入库添加   已添加的编号不显示
     * @return
     */
    List<CPurchase> findNoCK(CPurchase purchase);
}
